<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
		<style>
			.logininfo {
				background-color: #FFFFFF;
				border-radius: 5px;
				margin: 50px 20px 0px 20px;
				padding: 20px 20px 20px 20px;
			}
			
			.mui-input-row {
				position: relative;
				border: 1px #E3E3E3 solid;
				margin-top: 10px;
				margin-bottom: 10px;
				border-radius: 3px;
			}
			
			.mui-input-row input {
				width: 85%;
				float: right;
				border: none;
				vertical-align: middle;
				margin: 0;
			}
			
			.mui-input-row font: {
				position: absolute;
				font-size: 1.5rem;
				width: 15%;
				height: 100%;
				text-align: center;
				/*border:1px solid ''#000000 ;*/
			}
			
			.mui-bar a {
				color: #fff;
			}
			
			.iconfont:before {
				position: absolute;
				font-size: 1.5rem;
				top: 50%;
				margin-top: -10px;
				left: 5%;
			}
			
			.mui-preview-image.mui-fullscreen {
				position: fixed;
				z-index: 20;
				background-color: #000;
			}
			
			.mui-preview-header,
			.mui-preview-footer {
				position: absolute;
				width: 100%;
				left: 0;
				z-index: 10;
			}
			
			.mui-preview-header {
				height: 44px;
				top: 0;
			}
			
			.mui-preview-footer {
				height: 50px;
				bottom: 0px;
			}
			
			.mui-preview-header .mui-preview-indicator {
				display: block;
				line-height: 25px;
				color: #fff;
				text-align: center;
				margin: 15px auto 4;
				width: 70px;
				background-color: rgba(0, 0, 0, 0.4);
				border-radius: 12px;
				font-size: 16px;
			}
			
			.mui-preview-image {
				display: none;
				-webkit-animation-duration: 0.5s;
				animation-duration: 0.5s;
				-webkit-animation-fill-mode: both;
				animation-fill-mode: both;
			}
			
			.mui-preview-image.mui-preview-in {
				-webkit-animation-name: fadeIn;
				animation-name: fadeIn;
			}
			
			.mui-preview-image.mui-preview-out {
				background: none;
				-webkit-animation-name: fadeOut;
				animation-name: fadeOut;
			}
			
			.mui-preview-image.mui-preview-out .mui-preview-header,
			.mui-preview-image.mui-preview-out .mui-preview-footer {
				display: none;
			}
			
			.mui-zoom-scroller {
				position: absolute;
				display: -webkit-box;
				display: -webkit-flex;
				display: flex;
				-webkit-box-align: center;
				-webkit-align-items: center;
				align-items: center;
				-webkit-box-pack: center;
				-webkit-justify-content: center;
				justify-content: center;
				left: 0;
				right: 0;
				bottom: 0;
				top: 0;
				width: 100%;
				height: 100%;
				margin: 0;
				-webkit-backface-visibility: hidden;
			}
			
			.mui-zoom {
				-webkit-transform-style: preserve-3d;
				transform-style: preserve-3d;
			}
			
			.mui-slider .mui-slider-group .mui-slider-item img {
				width: auto;
				height: auto;
				max-width: 100%;
				max-height: 100%;
			}
			
			.mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
				width: 100%;
			}
			
			.mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
				display: inline-table;
			}
			
			.mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
				display: table-cell;
				vertical-align: middle;
			}
			
			.mui-preview-loading {
				position: absolute;
				width: 100%;
				height: 100%;
				top: 0;
				left: 0;
				display: none;
			}
			
			.mui-preview-loading.mui-active {
				display: block;
			}
			
			.mui-preview-loading .mui-spinner-white {
				position: absolute;
				top: 50%;
				left: 50%;
				margin-left: -25px;
				margin-top: -25px;
				height: 50px;
				width: 50px;
			}
			
			.mui-preview-image img.mui-transitioning {
				-webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
				transition: transform 0.5s ease, opacity 0.5s ease;
			}
			
			@-webkit-keyframes fadeIn {
				0% {
					opacity: 0;
				}
				100% {
					opacity: 1;
				}
			}
			
			@keyframes fadeIn {
				0% {
					opacity: 0;
				}
				100% {
					opacity: 1;
				}
			}
			
			@-webkit-keyframes fadeOut {
				0% {
					opacity: 1;
				}
				100% {
					opacity: 0;
				}
			}
			
			@keyframes fadeOut {
				0% {
					opacity: 1;
				}
				100% {
					opacity: 0;
				}
			}
			
			p img {
				max-width: 100%;
				height: auto;
			}
			
			#wechatimg {
				display: none;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left backbtn"></a>
			<h1 class="mui-title">专属客服</h1>
			<a class=" mui-pull-right homebtn" ></a>
		</header>
		<div class="mui-content">
			<div class="logininfo">
				<div class="mui-input-row  ">
					<font class="iconfont icon-weixin"></font>
					<input id='wechat' type="text" class=" mui-input" placeholder="" disabled="disabled">
				</div>
				<div class="btn">
					<!--<img data-preview-src="" data-preview-group="" src="" id="wechatimg"   />-->
					<img src="../images/yuantiao.jpg" data-preview-group="1" data-preview-src="" id="wechatimg" />
					<button type="button" class="mui-btn mui-btn-yellow mui-btn-block " id="wechatimg-">显示二维码</button>
				</div>
				<div class="mui-input-row  ">
					<font class="iconfont icon-QQ"></font>
					<input id='qq' type="text" class=" mui-input" placeholder="" disabled="disabled">
				</div>
				<div class="btn">
					<button type="button" class="mui-btn mui-btn-yellow mui-btn-block  qq">联系QQ客服</button>
				</div>
				<div class="mui-input-row  ">
					<font class="iconfont icon-shoujihaoma-"></font>
					<input id='workPhone' type="text" class=" mui-input" placeholder="" disabled="disabled">
				</div>
				<div class="btn">
					<button type="button" class="mui-btn mui-btn-yellow mui-btn-block  tel ">拨打客服电话</button>
				</div>
			</div>

		</div>
		<script src="../lib/mui.min.js"></script>
		<script src="../lib/mui.zoom.js"></script>
		<script src="../lib/mui.previewimage.js"></script>
		<script type="text/javascript" src="../lib/jquery-1.11.0.js"></script>
		<script type="text/javascript" src="../lib/service.js"></script>

		<script type="text/javascript">
			//			mui.init()
			mui.previewImage();
			var data;
			mui.plusReady(function() {
				plus.navigator.setStatusBarBackground("#FF7234");
				var parms = plus.webview.currentWebview().parms;
				var id = JSON.parse(parms).id;
				getServer('app/servicesDel', $.param({
					serviceId: id
				}), function(res) {
					console.log(JSON.stringify(res))
					data = res.data.servicePerson;
					$('#wechat').val(data.weixin);
					$('#qq').val(data.qq);
					$('#workPhone').val(data.phone);
					$('#wechatimg').attr('src', serverUrl + '/upload/' + data.weixinImg)
				});
			})
			$('.tel').bind('tap', function() {
				plus.device.dial(data.workPhone, true)
			})
			var previewImageApi = mui.previewImage();
			$('#wechatimg-').bind('tap', function() {
				var img = document.getElementById('wechatimg')
				previewImageApi.open(img)
			})
			$('.qq').bind('tap', function() {
				if(plus.tools.platform == plus.tools.ANDROID){
					plus.runtime.launchApplication({
						pname: "com.tencent.mobileqq",
						extra: {

							url: "mqqwpa://im/chat?chat_type=wpa&version=1&src_type=web&uin="+ $('#qq').val()
						}
					}, function(e) {
						plus.nativeUI.confirm("检查到您未安装QQ，请先下载安装！", function(i) {
							if(i.index == 0) {
								androidMarket("com.tencent.mobileqq");
							}
						});
					});
				}
				if(plus.os.name == "iOS") {
					plus.runtime.launchApplication({
						action: "mqq://im/chat?chat_type=wpa&version=1&src_type=web&uin=" + $('#qq').val()
					}, function(e) {
						plus.nativeUI.confirm("检查到您未安装qq，请先到appstore搜索下载？", function(i) {
							if(i.index == 0) {
								iosAppstore("itunes.apple.com/cn/app/mqq/");
							}
						});
					});
				}
			})
		</script>
	</body>

</html>